class UpgradeSourdoughPlugin < ActiveRecord::Migration
  def self.up
    ActiveRecord::Base.transaction do
      # set the plugin version in plugin_schema_info
      execute("INSERT INTO plugin_schema_info values ('sourdough', 4)")
    end
    Rails.plugins["sourdough"].migrate(5)
  end

  def self.down
    Rails.plugins["sourdough"].migrate(4)
    ActiveRecord::Base.transaction do
      execute("DELETE FROM plugin_schema_info")
    end
  end
end
